/*
 * @Author: pengtianrui 2276608413@qq.com
 * @Date: 2024-07-19 14:42:56
 * @LastEditors: 武兴创 superjava@vip.qq.com
 * @LastEditTime: 2024-08-28 17:46:35
 * @FilePath: \SGFEM\DataStructure\FEM\Constraint\include\RBE1Data.h
 * @Description: RBE1 单元数据
 * RBE1
 */

#pragma once

#include <vector>

#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Input/Element/ElementBase.h"
#include "DataStructure/Input/Solver/DOFDirections.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
struct DECLSPEC RBE1Data : public ElementBase
{
    struct DECLSPEC DEP
    {
        SG::DataStructure::Common::Id m_gm = 0;
        SG::DataStructure::Common::Id m_cm = 0;
    };
    struct DECLSPEC INDEP
    {
        SG::DataStructure::Common::Id m_gn = 0;
        SG::DataStructure::Common::Id m_cn = 0;
    };

    SG::DataStructure::Common::Real m_alpha          = 0.0;  ///< 热膨胀系数
    SG::DataStructure::Common::Real m_refTemperature = 0.0;  ///< 参考温度
    std::vector<DEP>                m_depList;               /// 从自由度
    std::vector<INDEP>              m_indepList;             /// 独立自由度

    SG::DataStructure::Common::Id m_domainId = 0;
};
/** 此处方法不需要导出 */
bool operator== (const RBE1Data::DEP& lhs, const RBE1Data::DEP& rhs);
bool operator== (const RBE1Data::INDEP& lhs, const RBE1Data::INDEP& rhs);

/// @brief 判断两个RBE1Data是否相等
/// @param lhs
/// @param rhs
/// @return
DECLSPEC bool operator== (const RBE1Data& lhs, const RBE1Data& rhs);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE